gmp: fix cross compilation to windows#132188
Conversation
|
|
||
| # Required for "undefined reference to __memset_chk" error | ||
| # see https://github.com/msys2/MINGW-packages-dev/pull/6 | ||
| NIX_LDFLAGS = lib.optionalString stdenv.targetPlatform.isWindows "-lssp"; |
There was a problem hiding this comment.
CPPFLAGS=-fstack-protector also gets through the __memset_chk error, but later hits undefined reference to `__stack_chk_fail'`
|
Not sure if this should be backported to |
|
Diff LGTM |
|
I just ran into the same issue when trying to build |
|
This one also needs to target staging, due to the number of rebuilds. |
fd24eca to
c1bc3f3
Compare
Actually, I'm confused. |
That's because |
adding -lssp could probably go in pkgs/build-support/cc-wrapper/add-hardening.sh maybe? |
|
Turns out this isn't quite right.
This ended up breaking other things, including a dependency of It seems actually fixing this requires #38632, which in turn requires #132340, so I'm marking this as a draft for the time being. |
* The __memcpy_chk fix is similar to what is proposed here NixOS#132188 * We also need pthreads Didn't test running, but compiles fine.
|
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)